package cn.merge;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.write.builder.ExcelWriterBuilder;

/**
 *
 */
public class qqqq {

    public static void main(String[] args) {
            ExcelWriterBuilder excelWriterBuilder = EasyExcel.write("现金流预测报告.xlsx");

        List<List<Object>> list = new ArrayList<>();
        List<Object> l1 = new ArrayList<>();
        l1.add("1");
        l1.add("2");

        List<Object> l2 = new ArrayList<>();
        l2.add("11");
        l2.add("22");


        list.add(l1);
        list.add(l2);

        List<String> headTitleInfo = new ArrayList<>();
        headTitleInfo.add("title1");
        List<String> headTitleInfo2 = new ArrayList<>();
        headTitleInfo2.add("title2");
        List<List<String>> headTitleInfos = new ArrayList<>();
        headTitleInfos.add(headTitleInfo);
        headTitleInfos.add(headTitleInfo2);

        excelWriterBuilder
                    .file(new File("11.xlsx"))
                    .head(headTitleInfos)
                    .sheet("现金流预测报告")
                    .doWrite(list);


    }
}
